package com.jch.helloworld.configBeans.annotation2.controller;

import com.jch.helloworld.configBeans.annotation2.service.DemoAnnotation2Service;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;

@Controller  // 控制层
public class DemoAnnotation2Controller {

    @Autowired
    private DemoAnnotation2Service service;

    public void save(){
        System.out.println("DemoAnnotation2Controller save...");
        service.add();
        System.out.println(service);
    }

}
